package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.ScoreListReqVO;
import com.ruoyi.system.domain.vo.ScoreListResVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DwScoreMapper;
import com.ruoyi.system.domain.DwScore;
import com.ruoyi.system.service.IDwScoreService;

/**
 * 点赞关注收藏Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-19
 */
@Service
public class DwScoreServiceImpl implements IDwScoreService 
{
    @Autowired
    private DwScoreMapper dwScoreMapper;


    /**
     * 查询点赞关注收藏列表
     *
     * @param reqVO 点赞关注收藏
     * @return 点赞关注收藏集合
     */
    @Override
    public List<ScoreListResVO> selectScoreList(ScoreListReqVO reqVO){
        return dwScoreMapper.selectScoreList(reqVO);
    }
    /**
     * 查询点赞关注收藏
     * 
     * @param scoreId 点赞关注收藏主键
     * @return 点赞关注收藏
     */
    @Override
    public DwScore selectDwScoreByScoreId(Long scoreId)
    {
        return dwScoreMapper.selectDwScoreByScoreId(scoreId);
    }

    /**
     * 查询点赞关注收藏列表
     * 
     * @param dwScore 点赞关注收藏
     * @return 点赞关注收藏
     */
    @Override
    public List<DwScore> selectDwScoreList(DwScore dwScore)
    {
        return dwScoreMapper.selectDwScoreList(dwScore);
    }

    /**
     * 新增点赞关注收藏
     * 
     * @param dwScore 点赞关注收藏
     * @return 结果
     */
    @Override
    public int insertDwScore(DwScore dwScore)
    {
        dwScore.setCreateTime(DateUtils.getNowDate());
        return dwScoreMapper.insertDwScore(dwScore);
    }

    /**
     * 修改点赞关注收藏
     * 
     * @param dwScore 点赞关注收藏
     * @return 结果
     */
    @Override
    public int updateDwScore(DwScore dwScore)
    {
        dwScore.setUpdateTime(DateUtils.getNowDate());
        return dwScoreMapper.updateDwScore(dwScore);
    }

    /**
     * 批量删除点赞关注收藏
     * 
     * @param scoreIds 需要删除的点赞关注收藏主键
     * @return 结果
     */
    @Override
    public int deleteDwScoreByScoreIds(Long[] scoreIds)
    {
        return dwScoreMapper.deleteDwScoreByScoreIds(scoreIds);
    }

    /**
     * 删除点赞关注收藏信息
     * 
     * @param scoreId 点赞关注收藏主键
     * @return 结果
     */
    @Override
    public int deleteDwScoreByScoreId(Long scoreId)
    {
        return dwScoreMapper.deleteDwScoreByScoreId(scoreId);
    }
}
